import { createApp } from 'vue'

import App from './App.vue'
import {createPinia} from "pinia";
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate'
import router from './router'
// @ts-ignore
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import axios from 'axios'

axios.defaults.baseURL = '/api/admin'
axios.defaults.timeout = 30000



const store = createPinia()
store.use(piniaPluginPersistedstate)
const app = createApp(App)
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    // @ts-ignore
    app.component(key, component)
}
app.use(router)
app.use(store)

app.mount('#app')
